package com.example.springstudy.common;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import lombok.val;

@EqualsAndHashCode(callSuper = true)
@Data
@SuperBuilder
@NoArgsConstructor
public class SuccessResult<T> extends ServiceResult<T> {


    public SuccessResult(T data) {
        super();
        val success = ResultCode.success();
        this.setSuccess(true);
        this.setCode(success.getCode());
        this.setMessage(success.getMessage());
        this.setData(data);
    }
}
